package sj.sj.dao.impl;

import org.mybatis.spring.support.SqlSessionDaoSupport;
import sj.sj.dao.supplier.SupplierMapper;
import sj.sj.pojo.Supplier;

import java.util.List;

public class SupplierMapperImpl extends SqlSessionDaoSupport implements SupplierMapper {
    @Override
    public List<Supplier> selectSupplierList(Supplier supplier) {
        return this.getSqlSession().selectList("SupplierMapper.selectSupplierList",supplier);
    }

    @Override
    public int addSupplier(Supplier supplier) {
        return this.getSqlSession().update("SupplierMapper.add",supplier);
    }

    @Override
    public int delSupplier(Integer id) {
        return this.getSqlSession().update("SupplierMapper.delSupplier",id);
    }

    @Override
    public int updateSupplier(Supplier supplier) {
        return this.getSqlSession().update("SupplierMapper.updateSupplier",supplier);
    }

}
